﻿using Expect.Core.Interfaces;

namespace Expect.Core
{
    /// <summary>
    /// Base class for fixture implementation
    /// </summary>
    public interface IFixtureImplementation : IContextConsumer
    {
        /// <summary>
        /// Execution context
        /// </summary>
        new IExecutionContext Context { get; set; }

        /// <summary>
        /// Current specification
        /// </summary>
        SpecificationDefinition Specification { get; set; }

        /// <summary>
        /// Fixture definition
        /// </summary>
        FixtureDefinition Fixture { get; set; }

        /// <summary>
        /// Current row
        /// </summary>
        FixtureRow Row { get; set; }

        /// <summary>
        /// Fill arguments and definition if necessary
        /// </summary>
        /// <returns></returns>
        void Resolve();

        /// <summary>
        /// Execute the fixture for the provided row
        /// </summary>
        bool? RunRow();

        /// <summary>
        /// Called when there is no more rows to process
        /// </summary>
        void EndRun();
    }
}
